package com.acme.task4;

/**
 * This class counts number of particular values in array
 * 
 * @author Anton Kotov
 */
public class Task4Arrays {
	/**
	 * Main method
	 * 
	 * @param args
	 */
	public static void main(String[] args) {

		int array[] = new int[10];
		array[0] = 3;
		array[1] = 7;
		array[2] = 3;
		array[3] = 9;
		array[4] = 7;
		array[5] = 7;
		array[6] = 3;
		array[7] = 7;
		array[8] = 9;
		array[9] = 3;

		int numberOf3 = 0, numberOf7 = 0, numberOf9 = 0;

		for (int i = 0; i < 10; i++) {
			switch (array[i]) {
			case 3:
				numberOf3++;
				break;
			case 7:
				numberOf7++;
				break;
			case 9:
				numberOf9++;
				break;
			default:
				break;
			}
		}
		System.out.println("Number of 3: " + numberOf3);
		System.out.println("Number of 7: " + numberOf7);
		System.out.println("Number of 9: " + numberOf9);
	}
}
